import axios from 'axios'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import scroll from 'vue-seamless-scroll'
import App from './App.vue'
import router from './router'
import store from './store'
import './styles/element/index.scss'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
const app = createApp(App)
    // for ([name, comp] of Object.entries(ElementPlusIconsVue)) {
    //     app.component(name, comp);
    //   }


app.config.globalProperties.$axios = axios;
axios.defaults.baseURL = process.env.VUE_APP_API_URL
// axios.defaults.baseURL = 'http://home.linwine.space:9900/psms'
axios.defaults.headers.common['Authorization'] = localStorage.getItem("my_token")
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
app.use(store).use(ElementPlus, {
    locale: zhCn,
}).use(router).use(scroll).mount('#app')